home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.31-14 / scripts / headers.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2009-09-09  |  608 b   |  35 lines

  1. #!/bin/sh
  2. # Run headers_$1 command for all suitable architectures
  3.  
  4. # Stop on error
  5. set -e
  6.  
  7. do_command()
  8. {
  9.     if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
  10.         make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
  11.     elif [ -f ${srctree}/include/asm-$2/Kbuild ]; then
  12.         make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
  13.     else
  14.         printf "Ignoring arch: %s\n" ${arch}
  15.     fi
  16. }
  17.  
  18. archs=$(ls ${srctree}/arch)
  19.  
  20. for arch in ${archs}; do
  21.     case ${arch} in
  22.     um)        # no userspace export
  23.         ;;
  24.     cris)      # headers export are known broken
  25.         ;;
  26.     *)
  27.         if [ -d ${srctree}/arch/${arch} ]; then
  28.             do_command $1 ${arch}
  29.         fi
  30.         ;;
  31.     esac
  32. done
  33.  
  34.  
  35.